<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
     .walking{
            position: relative;
            margin: 50px auto;
            width: 120px;
            height: 180px;
            border: 1px solid #000000;
            overflow: hidden;
        }
        .walking>img{
            position: absolute;
            top:0;
            left: 0;
            animation: walking 1s steps(8) 0s infinite;
        }
        @keyframes walking {
            form{
                left: 0;
            }
            to{
                left: -960px;
            }
        }
</style>
<body>
    <div class="walking">
        <img src="./imgs/walking.png" alt="走路图片">
    </div>

</body>
</html>